﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SeleniumToolkit.Core;
using Selenium;

namespace NUnit.CustomSeleniumFactory
{
    public class CustomSeleniumFactoryProvider : ISeleniumFactoryProvider
    {
        #region ISeleniumFactoryProvider Members

        public Selenium.ISelenium Create(string serverHost, int serverPort, string browserProfile, string baseUrl)
        {
            ICommandProcessor processor = new HttpCommandProcessor(serverHost, serverPort, browserProfile, baseUrl);
            return new CustomSelenium(processor);
        }

        #endregion
    }

    public class CustomSelenium : DefaultSelenium
    {
        public CustomSelenium(ICommandProcessor processor)
            : base(processor)
        {
            CommandProcessor = processor;
        }

        public ICommandProcessor CommandProcessor
        {
            get;
            protected set;
        }
    }
}
